GtkMenuTracker: tweak separator logic
authorRyan Lortie <desrt@desrt.ca>
Fri, 27 Dec 2013 03:45:03 +0000 (22:45 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sat, 4 Jan 2014 07:31:08 +0000 (02:31 -0500)
commitba09124f9f88f9e28b2cabf445606c3f44ec52f7
treebacfe7a28276a243c5cd235a9877a7d3f9431971
parentf90016f069d2be12d0c00ae052000b7b28fc521e
GtkMenuTracker: tweak separator logic

Ignacio Casal Quinteiro reported a problem whereby an empty section at
the start of a menu has a separator placed after it.  This was caused by
the implementation of the logic that separators should be inserted at
the top of all non-empty sections that are not the first section.  This
logic is obviously incorrect in the case that the first section is empty
(in which case we would not expect to see a separator at the top of the
second section).

Change the logic so that we only insert separators when we see a
non-zero number of actual items in the menu before us.

https://bugzilla.gnome.org/show_bug.cgi?id=721119
gtk/gtkmenutracker.c